package xyz.hubery.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import xyz.hubery.domain.CashWithdrawAuditRecord;
import xyz.hubery.domain.CashWithdrawals;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.hubery.model.SellGCNParam;

public interface CashWithdrawalsService extends IService<CashWithdrawals>{

    /**
     * 分页查询提现记录
     * @param page
     * @param userId
     * @param userName
     * @param mobile
     * @param status
     * @param numMin
     * @param numMax
     * @param startTime
     * @param endTime
     * @return
     */
    Page<CashWithdrawals> findPage(Page<CashWithdrawals> page, Long userId, String userName, String mobile, Byte status, Integer numMin, Integer numMax, String startTime, String endTime);

    /**
     * 分页查询用户的提现记录
     * @param page
     * @param userId
     * @param status
     * @return
     */
    Page<CashWithdrawals> findCashWithdrawalsPage(Page<CashWithdrawals> page, Long userId, Byte status);

    /**
     * GCN提现
     * @param userId 用户ID
     * @param param 卖出参数
     * @return
     */
    boolean sell(Long userId, SellGCNParam param);

    /**
     * 提现审核
     * @param adminId 管理员ID
     * @param cashWithdrawAuditRecord 审核记录
     * @return
     */
    boolean updateStatus(Long adminId, CashWithdrawAuditRecord cashWithdrawAuditRecord);
}
